package com.ls.fw.search.solrj.service;

import com.ls.fw.search.solrj.support.search.SearchParameter;
import com.ls.fw.search.solrj.support.search.SearchRequest;

import java.util.List;


/**
 * @param <T> the type of returned results
 * @param <P> the supported search parameter enumeration
 * @param <R> the supported search request type. For faceted searches this needs to extend
 *        {@link com.ls.fw.search.solrj.support.search.FacetedSearchRequest}
 */
public interface SuggestService<T, P extends Enum<?> & SearchParameter, R extends SearchRequest<P>> {

  /**
   * Issues a SearchRequest for a suggest and retrieves the list of matches.
   * The actual result information will contain a list elements of type T.
   *
   * @param suggestRequest the input object to be used for performing the operation.
   */
  List<T> suggest(R suggestRequest);

}
